package com.ms.p2p.entity;


import com.ms.p2p.entity.member.Member;

/**
 * Created by chensk on 2018/2/5.
 */
public class UserThreadLocal {

    //把构造函数私有，外面不能new，只能通过下面两个方法操作
    private UserThreadLocal(){

    }
    private static final ThreadLocal<Member> LOCAL = new ThreadLocal<Member>();
//    private static final String a = "3";
    public static void set(Member user){
        LOCAL.set(user);;
    }

    public static Member get(){
        return LOCAL.get();
    }
}
